package COM.ZYC06;

public class Fruit {
    String name;
    //水果名称
    String area;
    //水果产地
    double price;
    //水果单价
    public Fruit(){

    }
    public Fruit(String name, String area, double price) {
        this.name = name;
        this.area = area;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "水果" + '\t' +
                "价格" + name + '\t' +
                ", 产地" + area + '\t' +
                ", 价格" + price ;
    }
}
